package im.oen.boot.api.annotation.handler;

import im.oen.boot.api.dao.AbsDao;
import im.oen.boot.api.entity.AbsEntity;
import im.oen.boot.common.data.Page;

import java.util.List;

/**
 * @author Kevin.Xu
 */
public class MethodAroundHandler<T extends AbsEntity> {
    public void createBefore(T data) {
    }

    public void createAfter(T data) {
    }

    public void deleteBefore(T data) {
    }

    public void deleteAfter(T data) {
    }

    public void updateBefore(T data) {
    }

    public void updateAfter(T data) {
    }


    public List<T> overrideFind(AbsDao dao, T data) {
        return null;
    }

    public void findBefore(T data) {
    }

    public void findAfter(List<T> result) {
    }

    public void countBefore(T data) {
    }

    public void countAfter(long result) {
    }

    public void findByIdBefore(T data) {
    }

    public void findByIdAfter(T data) {
    }

    public Page.Result<T> overridePage(AbsDao dao, Page.Request<T> data) {
        return null;
    }

    public void pageBefore(Page.Request<T> data) {
    }

    public void pageAfter(Page.Result<T> data) {
    }
}
